package question1;

import java.io.*;

public class DataOutInput {

    public static void dataInputStream(){
        try {
            FileInputStream fis = new FileInputStream("E:\\myFile\\wordcup.txt");
            DataInputStream dis = new DataInputStream(fis);

            FileOutputStream fos = new FileOutputStream("F:\\temp\\homework1\\Cat.java");
            DataOutputStream dos = new DataOutputStream(fos);
            int temp ;
            while((temp = dis.read())!= -1){
                dos.write(temp);
            }
            //关闭流
            fis.close();
            dos.close();
        }catch (IOException e){
            e.printStackTrace();
        }
    }
    public static void main(String[] args) {
        dataInputStream();
    }
}
